import React from 'react';

import ync from '../../assets/image/ync.png';
import sUSDLogo from '../../assets/img/sUSD.png';
import USDCLogo from '../../assets/img/USDC.png';

import HUSD from '../../assets/image/husd.png';
import bacLogo from '../../assets/image/scach.png';
import basLogo from '../../assets/image/share.png';
import medx from '../../assets/image/medx.png';
import sfundLogo from '../../assets/image/sfund.png';
import sht from '../../assets/image/sht.png';
import ht from '../../assets/image/ht.png';
import sneo from '../../assets/image/sneo.png';
import neo from '../../assets/image/neo.png';
import seth from '../../assets/image/seth.png';
import eth from '../../assets/image/eth.png';
import sbtc from '../../assets/image/sbtc.png';
import btc from '../../assets/image/btc.png';
import usdt from '../../assets/image/usdt.png';
import usdt_fil from '../../assets/image/usdt_fil.png';
import sdot from '../../assets/image/sdot.png';
import sfil from '../../assets/image/sfil.png';
import Filda from '../../assets/image/filda.png';
import hltc_fil from '../../assets/image/hltc_fil.png';
import HLTC from '../../assets/image/ltc.png';
import BAG from '../../assets/image/basisgold.png';
import TPT from '../../assets/image/tokenpocket.png';
import hdot_fil from '../../assets/image/hdot_fil.png';
import hdot from '../../assets/image/dot.png';
import fHFIL from '../../assets/image/hfil_fil.png';
import FIL from '../../assets/image/fil.png';
import hbo from '../../assets/image/hbo.png';
import lhb from '../../assets/image/lhb.png';
import nuls from '../../assets/image/nuls.png';

import husdt_fil from '../../assets/image/husdt_fil.png';
import hneo_fil from '../../assets/image/hneo_fil.png';
import eth_fil from '../../assets/image/eth_fil.png';
import hbch_fil from '../../assets/image/btc_fil.png';
import ht_fil from '../../assets/image/ht_fil.png';

import flm from '../../assets/image/flm.png';
import swth from '../../assets/image/swth.png';

import sflm from '../../assets/image/sflm.png';
import scan from '../../assets/image/scan.png';
import snuls from '../../assets/image/snuls.png';
import sfilda from '../../assets/image/sfilda.png';

import ela_fil from '../../assets/image/ela_fil.png';
import fix from '../../assets/image/fix.png';
import hpt from '../../assets/image/hpt.png';
import lava from '../../assets/image/lava.png';
import mdx_fil from '../../assets/image/mdx_fil.png';
import sovl from '../../assets/image/sovl.png';

import bee from '../../assets/image/bee.png';
import edc from '../../assets/image/edc.png';
import swftc from '../../assets/image/swftc.png';
import datt from '../../assets/image/datt.png';
import arch from '../../assets/image/arch.png';
import goblin from '../../assets/image/goblin.png';
import nvt from '../../assets/image/nvt.png';
import can from '../../assets/image/can.png';
import smdx from '../../assets/image/smdx.png';

import vSHARE from '../../assets/image/vSHARE.png';
import sSHARE from '../../assets/image/sSHARE.png';
import ela from '../../assets/image/elastos.png';
import ImageCommon from "../../assets/image/common/ImageCommon";

const logosBySymbol: {[title: string]: string} = {
  'YNC_USDT_LP':lava,
  'YNC':ync,
  'NYC':ImageCommon.icon_coin_gold,
  "NYC_USDT_LP":ImageCommon.icon_coin_gold,
  'ELA':ela,
  'BTC':btc,
  'SNB': sfundLogo,
  'Filda': Filda,
  'FILDA': Filda,
  'HLTC': HLTC,

  'FIL': FIL,
  'BAG': BAG,
  'TPT': TPT,
  'CASH': bacLogo,
  'sCASH': bacLogo,
  'HARE': basLogo,
  'SHARE': basLogo,
  'FUND': sfundLogo,
  'sNEO': sneo,
  'pNEO': neo,
  'NEO': neo,
  'sETH': seth,
  'sBTC': sbtc,
  'HDOT': hdot,
  'sDOT': sdot,
  'HFIL': FIL,
  'sFIL': sfil,
  'wETH': eth,
  'wHT': ht,
  'sHT': sht,
  'sFLM': sflm,
  'sCAN': scan,
  'sNULS': snuls,
  'sFILDA': sfilda,

  'fHUSD' : husdt_fil,
  'fUSDT': usdt_fil,
  'fHBTC': hbch_fil,
  'fETH': eth_fil,
  'fHT': ht_fil,
  'fNEO': hneo_fil,
  'fHDOT': hdot_fil,
  'fHLTC': hltc_fil,
  'fHFIL': fHFIL,

  'HT': ht,
  'HUSD': HUSD,
  'ETH': seth,
  'HETH': seth,
  'HBTC': btc,
  'SUSD': sUSDLogo,
  'USDC': USDCLogo,
  'USDT': usdt,

  'MDX': medx,
  'HBO': hbo,
  'LHB': lhb,
  'NULS': nuls,

  'MEDX': medx,
  'sCASH_USDT_LP': medx,
  'sCASH_HUSD_LP': medx,
  'SHARE_USDT_LP': medx,
  'SHARE_HUSD_LP': medx,

  'sHT_wHT_LP': medx,
  'SHARE_wHT_LP': medx,
  'sHT_USDT_LP': medx,
  'sHT_sCASH_LP': medx,

  'sNEO_pNEO_LP': medx,
  'sNEO_USDT_LP': medx,
  'sNEO_sCASH_LP': medx,
  'SHARE_pNEO_LP': medx,

  'pFLM': flm,
  'pSWTH': swth,

  'sHT_Filda_LP': medx,
  'sHT_CAN_LP': medx,
  'sCASH_NULS_LP': medx,
  'sNEO_pFLM_LP': medx,

  'SOVI': sovl,
  'FIX': fix,
  'LAVA': lava,
  'HPT': hpt,
  'fELA': ela_fil,
  'fMDX': mdx_fil,

  'sFILDA_FILDA_LP': medx,
  'FILDA_sHT_LP': medx,
  'SHARE_FILDA_LP': medx,
  'sFILDA_SHARE_LP': medx,

  'BEE': bee,
  'EDC': edc,
  'SWFTC': swftc,
  'DATT': datt,
  'ARCH': arch,
  'GOBLIN': goblin,
  'NVT': nvt,
  'CAN': can,

  'sNULS_NULS_LP': medx,
  'SHARE_NULS_LP': medx,
  'sNULS_SHARE_LP': medx,

  'vSHARE': vSHARE,
  'sSHARE': sSHARE,
  'sMDX': smdx,

  'sHT_MDX_LP': medx,

  'SHARE_USDT_LAVA_LP': lava,
};

type BasisLogoProps = {
  symbol: string;
  size?: number;
}

const TokenSymbol: React.FC<BasisLogoProps> = ({ symbol, size = 60 }) => {
  if (!logosBySymbol[symbol]) {
    console.log(symbol)
    throw new Error(`Invalid BasisLogo symbol: ${symbol}`);
  }
  return (
    <img
      src={logosBySymbol[symbol]}
      alt={`${symbol} Logo`}
      width={size}
    />
  )
};

export default TokenSymbol;
